<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>商之联-商家后台管理系统</title>
  <meta name="description" content="">
  <meta name="keywords" content="table">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="{:C('SHOP_HOME_IMG')}favicon.png"> <link rel="apple-touch-icon-precomposed" href="{:C('SHOP_HOME_IMG')}app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="{:C('SHOP_HOME_CSS')}amazeui.min.css"/>
  <link rel="stylesheet" href="{:C('SHOP_HOME_CSS')}admin.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->
<!-- header start-->

<include file="Public:header"/>

<!-- header end-->

<div class="am-cf admin-main">
 <!-- sidebar start -->
   <include file="Public:menu"/>
  <!-- sidebar end -->
  
  <!-- content start -->
  <div class="admin-content">

    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">订单管理</strong> / <small>订单列表</small></div>
    </div>
    <div class="am-g">
      <div class="am-u-sm-12 am-u-md-4 ">
        <p>开始时间：<input class="laydate-icon" id="start" style="width:200px; " type="text" /></p>
        
      </div>
      <div class="am-u-sm-12 am-u-md-4 ">
        <p>结束时间：<input class="laydate-icon" id="end" style="width:200px; " type="text" /></p>
      </div>
      <div class="am-u-sm-12 am-u-md-4">
          <p><label>订单类型：</label>
          <select name="areatype">
              <option value="99">请选择订单类型 </option>
              <option value="1">现货区 </option><option value="2">网购区 </option><option value="3">店长推荐区 </option><option value="4">乡镇专供区 </option><option value="5">工程团购区 </option>        </select>
          </p>
      </div>  
    </div>
    <div class="am-g">
      <P>
        <button class="am-btn am-btn-default" type="button" style="background-color: #0EABE5;color: #fff; float:right;margin-right:70px" onclick="$.Order.searchOrder()">搜索</button>
      </P>
    </div>
    <div class="am-g">
      <div class="am-u-sm-12">
        <form class="am-form">
          <table class="am-table am-table-striped am-table-hover table-main ordertable table-main am-text-nowrap am-scrollable-horizontal">
            <thead>
              <tr>
                <th class="table-check"><input type="checkbox"></th>
                <th class="table-title">订单号</th>
                <th class="table-title">创建时间</th>
                <th class="table-title">支付类型</th>
                <th class="table-title">订单数量</th>
                <th class="table-title">订单金额</th>
                <th class="table-date">订单名称</th>
                <th class="table-date">订单状态</th>
                <th class="table-set">操作</th>
              </tr>
          </thead>
          <tbody>
            <foreach name="orders" item='order'>
            <tr>
              <td><input type="checkbox"></td>
              <td>{$order['order_sn']}</td>
              <td>{$order['create_time']}</td>
               <td>
               	{$order.pay_type}
               		
               </td>
               <td>{$order['number']}</td>         
              <td>{$order['order_amount']}</td> 
              <td>{$order['itemname']} </td>
              <td>
                 {$order.orderstatus}
                  
              </td>
              <td>
                  <div class="am-btn-group am-btn-group-xs">
	                    
	                    <span class="am-icon-pencil-square-o">
	                    <a href="{:U('Order/getOrder',array('orderid'=>$order['orderid']))}">查看详情</a> 
	                    </span> 
                       &nbsp;<span class="am-icon-trash-o"></span>
                      <a href="javascript:void(0)" class="delorder"  onclick="$.Order.delorder({$order['orderid']})"> 删除 </a>
                </div>
              </td>
            </tr>
            </foreach>
          </tbody>
        </table>
         <!--  <div class="am-cf orderpage">
           共 {$pagearr['count']}条记录
           
         <div class="am-fr">
             <ul class="am-pagination">
               <li><a href="{:U('Order/index',array('page'=>$pagearr['prevpage']))}">«</a></li>
                <?php $k=0; ?>
               <for start="$pagearr['page']" end="$pagearr['pagetotal']+1"  name='i' step="1">
                  <if condition="$k lt 6">
          <li <if condition="$i eq $pagearr['page']"> class="am-active" </if>  > <a href="{:U('Order/index',array('page'=>$i))}">{$i}</a></li>
                  </if>
                <?php $k+=1;  ?>
               </for>
               
               <li><a href="{:U('Order/index',array('page'=>$pagearr['nextpage']))}">»</a></li>
             </ul>
           </div>
         
         </div> -->
         <ul class="am-pagination" style="float:right;" >

          <li>共<label class="count"> {$pagearr['count']}</label> 条记录</li>
          <li>共<label class="pagetotal"  >{$pagearr['pagetotal']}</label> 页</li> 
          <li>当前第 <label class="currentpage"> {$pagearr['page']} </label> 页</li>
          <li><a href="javascript:void(0)"  class="firpage" value="1" >第一页</a></li>
          <li><a href="javascript:void(0)"  class="prepage" value={$pagearr['page']-1}>上一页</a></li>
          <li><a href="javascript:void(0)"  class="nexpage" value={$pagearr['page']+1}>下一页</a></li>
          <li><a href="javascript:void(0)"  class="laspage" value={$pagearr['pagetotal']}>最末页</a></li>
        </ul>

        </form>
      </div>

    </div>
  </div>
  <!-- content end -->
</div>
<footer>
  <hr>
  <p class="am-padding-left">© 2014 商之联.</p>
</footer>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/rem.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/respond.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}amazeui.legacy.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="{:C('SHOP_HOME_JS')}jquery.min.js"></script>
<script src="{:C('SHOP_HOME_JS')}amazeui.min.js"></script>
<!--<![endif]-->
<script src="{:C('SHOP_HOME_JS')}app.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}laydate/laydate.js"></script>
<script src="{:C('SHOP_HOME_JS')}shop.js"></script>
<script type="text/javascript">
  //日期插件

var start = {
    elem: '#start',
    format: 'YYYY-MM-DD hh:mm:ss',
    min: '1999-06-16 23:59:59', //设定最小日期为当前日期
    max: '2099-06-16 23:59:59', //最大日期
    istime: true,
    istoday: false,
    choose: function(datas){
         end.min = datas; //开始日选好后，重置结束日的最小日期
         end.start = datas //将结束日的初始值设定为开始日
    }
};
var end = {
    elem: '#end',
    format: 'YYYY-MM-DD hh:mm:ss',
    min: '1999-06-16 23:59:59',
    max: '2099-06-16 23:59:59',
    istime: true,
    istoday: false,
    choose: function(datas){
        start.max = datas; //结束日选好后，重置开始日的最大日期
    }
};
laydate(start);
laydate(end);
//翻页事件
 //分页
    $('.firpage,.prepage,.nexpage,.laspage').on('click',function(){
         //当前页数
         $this=$(this);
         var $page=($this.attr('value')!=false)?$this.attr('value'):1;   
         $.Order. searchOrder($page);
         
    })
</script>
</body>
</html>
